package com.fasterxml.jackson.core.util;

import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import java.math.BigDecimal;
import java.math.BigInteger;

import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.async.NonBlockingInputFeeder;

/**
 * 添加了<code>public Object getObject() throws IOException</code>方法
 */
public class JsonParserDelegate extends JsonParser {
    protected JsonParser delegate;

    public JsonParserDelegate(JsonParser d) {
        delegate = d;
    }

    @Override
    public void setCodec(ObjectCodec c) {
        delegate.setCodec(c);
    }

    @Override
    public ObjectCodec getCodec() {
        return delegate.getCodec();
    }

    @Override
    public JsonParser enable(Feature f) {
        delegate.enable(f);
        return this;
    }

    @Override
    public JsonParser disable(Feature f) {
        delegate.disable(f);
        return this;
    }

    @Override
    public boolean isEnabled(Feature f) {
        return delegate.isEnabled(f);
    }

    @Override
    public int getFeatureMask() {
        return delegate.getFeatureMask();
    }

    @Override
    @Deprecated
    public JsonParser setFeatureMask(int mask) {
        delegate.setFeatureMask(mask);
        return this;
    }

    @Override
    public JsonParser overrideStdFeatures(int values, int mask) {
        delegate.overrideStdFeatures(values, mask);
        return this;
    }

    @Override
    public JsonParser overrideFormatFeatures(int values, int mask) {
        delegate.overrideFormatFeatures(values, mask);
        return this;
    }

    @Override
    public FormatSchema getSchema() {
        return delegate.getSchema();
    }

    @Override
    public void setSchema(FormatSchema schema) {
        delegate.setSchema(schema);
    }

    @Override
    public boolean canUseSchema(FormatSchema schema) {
        return delegate.canUseSchema(schema);
    }

    @Override
    public Version version() {
        return delegate.version();
    }

    @Override
    public Object getInputSource() {
        return delegate.getInputSource();
    }

    @Override
    public StreamReadConstraints streamReadConstraints() {
        return delegate.streamReadConstraints();
    }

    @Override
    public boolean canParseAsync() {
        return delegate.canParseAsync();
    }

    @Override
    public NonBlockingInputFeeder getNonBlockingInputFeeder() {
        return delegate.getNonBlockingInputFeeder();
    }

    @Override
    public JacksonFeatureSet<StreamReadCapability> getReadCapabilities() {
        return delegate.getReadCapabilities();
    }

    @Override
    public boolean requiresCustomCodec() {
        return delegate.requiresCustomCodec();
    }

    @Override
    public void close() throws IOException {
        delegate.close();
    }

    @Override
    public boolean isClosed() {
        return delegate.isClosed();
    }

    @Override
    public void clearCurrentToken() {
        delegate.clearCurrentToken();
    }

    @Override
    public JsonToken getLastClearedToken() {
        return delegate.getLastClearedToken();
    }

    @Override
    public void overrideCurrentName(String name) {
        delegate.overrideCurrentName(name);
    }

    @Override
    public void assignCurrentValue(Object v) {
        delegate.assignCurrentValue(v);
    }

    @Override
    @Deprecated
    public void setCurrentValue(Object v) {
        delegate.setCurrentValue(v);
    }

    @Override
    public JsonStreamContext getParsingContext() {
        return delegate.getParsingContext();
    }

    @Override
    public JsonToken currentToken() {
        return delegate.currentToken();
    }

    @Override
    public int currentTokenId() {
        return delegate.currentTokenId();
    }

    @Override
    public String currentName() throws IOException {
        return delegate.currentName();
    }

    @Override
    public Object currentValue() {
        return delegate.currentValue();
    }

    @Override
    public JsonLocation currentLocation() {
        return delegate.currentLocation();
    }

    @Override
    public JsonLocation currentTokenLocation() {
        return delegate.currentTokenLocation();
    }

    @Override
    @Deprecated
    public JsonToken getCurrentToken() {
        return delegate.getCurrentToken();
    }

    @Deprecated
    @Override
    public int getCurrentTokenId() {
        return delegate.getCurrentTokenId();
    }

    @Override
    @Deprecated
    public String getCurrentName() throws IOException {
        return delegate.getCurrentName();
    }

    @Override
    @Deprecated
    public Object getCurrentValue() {
        return delegate.getCurrentValue();
    }

    @Override
    @Deprecated
    public JsonLocation getCurrentLocation() {
        return delegate.getCurrentLocation();
    }

    @Override
    @Deprecated
    public JsonLocation getTokenLocation() {
        return delegate.getTokenLocation();
    }

    @Override
    public boolean hasCurrentToken() {
        return delegate.hasCurrentToken();
    }

    @Override
    public boolean hasTokenId(int id) {
        return delegate.hasTokenId(id);
    }

    @Override
    public boolean hasToken(JsonToken t) {
        return delegate.hasToken(t);
    }

    @Override
    public boolean isExpectedStartArrayToken() {
        return delegate.isExpectedStartArrayToken();
    }

    @Override
    public boolean isExpectedStartObjectToken() {
        return delegate.isExpectedStartObjectToken();
    }

    @Override
    public boolean isExpectedNumberIntToken() {
        return delegate.isExpectedNumberIntToken();
    }

    @Override
    public boolean isNaN() throws IOException {
        return delegate.isNaN();
    }

    @Override
    public String getText() throws IOException {
        return delegate.getText();
    }

    @Override
    public Object getObject() throws IOException {
        return delegate.getObject();
    }

    @Override
    public boolean hasTextCharacters() {
        return delegate.hasTextCharacters();
    }

    @Override
    public char[] getTextCharacters() throws IOException {
        return delegate.getTextCharacters();
    }

    @Override
    public int getTextLength() throws IOException {
        return delegate.getTextLength();
    }

    @Override
    public int getTextOffset() throws IOException {
        return delegate.getTextOffset();
    }

    @Override
    public int getText(Writer writer) throws IOException, UnsupportedOperationException {
        return delegate.getText(writer);
    }

    @Override
    public BigInteger getBigIntegerValue() throws IOException {
        return delegate.getBigIntegerValue();
    }

    @Override
    public boolean getBooleanValue() throws IOException {
        return delegate.getBooleanValue();
    }

    @Override
    public byte getByteValue() throws IOException {
        return delegate.getByteValue();
    }

    @Override
    public short getShortValue() throws IOException {
        return delegate.getShortValue();
    }

    @Override
    public BigDecimal getDecimalValue() throws IOException {
        return delegate.getDecimalValue();
    }

    @Override
    public double getDoubleValue() throws IOException {
        return delegate.getDoubleValue();
    }

    @Override
    public float getFloatValue() throws IOException {
        return delegate.getFloatValue();
    }

    @Override
    public int getIntValue() throws IOException {
        return delegate.getIntValue();
    }

    @Override
    public long getLongValue() throws IOException {
        return delegate.getLongValue();
    }

    @Override
    public NumberType getNumberType() throws IOException {
        return delegate.getNumberType();
    }

    @Override
    public NumberTypeFP getNumberTypeFP() throws IOException {
        return delegate.getNumberTypeFP();
    }

    @Override
    public Number getNumberValue() throws IOException {
        return delegate.getNumberValue();
    }

    @Override
    public Number getNumberValueExact() throws IOException {
        return delegate.getNumberValueExact();
    }

    @Override
    public Object getNumberValueDeferred() throws IOException {
        return delegate.getNumberValueDeferred();
    }

    @Override
    public int getValueAsInt() throws IOException {
        return delegate.getValueAsInt();
    }

    @Override
    public int getValueAsInt(int defaultValue) throws IOException {
        return delegate.getValueAsInt(defaultValue);
    }

    @Override
    public long getValueAsLong() throws IOException {
        return delegate.getValueAsLong();
    }

    @Override
    public long getValueAsLong(long defaultValue) throws IOException {
        return delegate.getValueAsLong(defaultValue);
    }

    @Override
    public double getValueAsDouble() throws IOException {
        return delegate.getValueAsDouble();
    }

    @Override
    public double getValueAsDouble(double defaultValue) throws IOException {
        return delegate.getValueAsDouble(defaultValue);
    }

    @Override
    public boolean getValueAsBoolean() throws IOException {
        return delegate.getValueAsBoolean();
    }

    @Override
    public boolean getValueAsBoolean(boolean defaultValue) throws IOException {
        return delegate.getValueAsBoolean(defaultValue);
    }

    @Override
    public String getValueAsString() throws IOException {
        return delegate.getValueAsString();
    }

    @Override
    public String getValueAsString(String defaultValue) throws IOException {
        return delegate.getValueAsString(defaultValue);
    }

    @Override
    public Object getEmbeddedObject() throws IOException {
        return delegate.getEmbeddedObject();
    }

    @Override
    public byte[] getBinaryValue(Base64Variant b64variant) throws IOException {
        return delegate.getBinaryValue(b64variant);
    }

    @Override
    public int readBinaryValue(Base64Variant b64variant, OutputStream out) throws IOException {
        return delegate.readBinaryValue(b64variant, out);
    }

    @Override
    public JsonToken nextToken() throws IOException {
        return delegate.nextToken();
    }

    @Override
    public JsonToken nextValue() throws IOException {
        return delegate.nextValue();
    }

    @Override
    public void finishToken() throws IOException {
        delegate.finishToken();
    }

    @Override
    public JsonParser skipChildren() throws IOException {
        delegate.skipChildren();

        return this;
    }

    @Override
    public boolean canReadObjectId() {
        return delegate.canReadObjectId();
    }

    @Override
    public boolean canReadTypeId() {
        return delegate.canReadTypeId();
    }

    @Override
    public Object getObjectId() throws IOException {
        return delegate.getObjectId();
    }

    @Override
    public Object getTypeId() throws IOException {
        return delegate.getTypeId();
    }

    public JsonParser delegate() {
        return delegate;
    }
}
